package com.thead;

/**
 * 实现了Runnable方法
 */
public class HeavyWorkRunnable implements Runnable {

    @Override
    public void run() {

        System.out.println("Doing heavyWork processing - Start" + Thread.currentThread().getName());

        try {
            Thread.sleep(1000);
            doDBProcessing();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        System.out.println("Doing heavyWork processing - End" + Thread.currentThread().getName());
    }

    private void doDBProcessing() throws InterruptedException{
        //执行相关的信息和进程
        Thread.sleep(1000);

    }
}
